package com.hdsx.restful.hyzt.mt.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hdsx.ao.base.BaseOpearte;
import com.hdsx.restful.hyzt.mt.bean.Mt;
import com.hdsx.restful.hyzt.mt.mapper.MtMapper;
import com.hdsx.restful.hyzt.mt.service.MtService;

@Service
public class MtServiceImpl extends BaseOpearte<Mt> implements MtService{

	public MtServiceImpl() {
		super("GIS_MT");
	}

	@Resource(name="mtMapper")
	private MtMapper mapper;
	
	@Override
	public int queryCount(String xzqhbm, String name, String lxbm) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", name);
		parameter.put("lxbm", lxbm);
		return mapper.queryCount(parameter);
		
	}

	@Override
	public List<Mt> queryList(String xzqhbm, String name, String lxbm, int page, int rows) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", name);
		parameter.put("lxbm", lxbm);
		parameter.put("begin", page);
		parameter.put("end", rows);
		List<Mt> lists=mapper.queryList(parameter);
		return lists;
	}

	@Override
	public Mt queryById(String id) {
		return mapper.selectById(id);
	}
	@Override
	public List<String> selectName(String name){
		return mapper.selectName(name);
	}
}
